/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package control;

import framework.dal.Link;
import framework.groups.NavieGroupManager;
import framework.groups.SmartGroupManager;
import javax.swing.JOptionPane;
import ui.MainUI;

/**
 *
 * @author Guilherme
 */
public class Start
{
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        Link.setParameters("127.0.0.1/test", "notes", "root", "flop123", "item");
        Integer i = JOptionPane.showConfirmDialog(null, "Gerenciar grupos de anotações automaticamente?");
        
        Manager.retrieveData();
        
        if (i != 2 && i != -1 && Manager.getGroups() != null)
        {
            if (i == 1)
            {
                Manager.setStrategy(new NavieGroupManager());
            }
            else if (i == 0)
            {
                Manager.setStrategy(new SmartGroupManager());
            }
            MainUI m = new MainUI();
            m.setVisible(true);
            Manager.STRATEGY.setGroups(m);
        }
        
        
    }
}
